package com.zxy.health.service;


import com.zxy.health.dao.TeacherDao;
import com.zxy.health.mapper.TeacherMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class TeacherService {
    @Autowired
    TeacherMapper teacherMapper;

    public String addTeacher(TeacherDao teacherDao){
        if (teacherMapper.getTeacherBySchoolId(teacherDao.getSchoolid()).size()!=0){
            return "添加错误，信息重复";
        }else {
             teacherMapper.insertTeacher(teacherDao);
             return "success";

        }
    }

}
